import request from "@/utils/request";

/**
 *商店注册-列表-----------------------------------------------
 */

//获取商店列表--------------------------------------------
export function getShopListAll(params) {
  return request({
    url: "/web/v1/all/allShop/getShopListAll",
    method: "get",
    params
  });
}

//商店注册--------------------------------------------
export function addShop(params) {
  return request({
    url: "/web/v1/all/allShop/insert",
    method: "post",
    params
  });
}

//续约--------------------------------------------
export function renewal(params) {
  return request({
    url: "/web/v1/all/allShop/renewal",
    method: "post",
    params
  });
}

//商店状态--------------------------------------------
export function stop(params) {
  return request({
    url: "/web/v1/all/allShop/stop",
    method: "post",
    params
  });
}

//提醒--------------------------------------------
export function remind(params) {
  return request({
    url: "/web/v1/all/allShop/remind",
    method: "post",
    params
  });
}
/**
 *账号管理-----------------------------------------------
 */
//获取账号列表--------------------------------------------
export function getShopList(params) {
  return request({
    url: "/web/v1/all/allShop/getShopList",
    method: "get",
    params
  });
}

//修改账号密码--------------------------------------------
export function updatePasswordByAdmin(params) {
  return request({
    url: "/web/v1/all/allShop/updatePasswordByAdmin",
    method: "post",
    params
  });
}

/**
 *商店管理-----------------------------------------------
 */
//获取视频/图文/日常 OPTION_VIDEO/OPTION_PIC/OPTION_DAY--------------------------------------------
export function getShopResource(params) {
  return request({
    url: "/web/v1/ShopPicVideo/getList",
    method: "get",
    params
  });
}

//新增视频/图文/日常 OPTION_VIDEO/OPTION_PIC/OPTION_DAY--------------------------------------------
export function addShopResource(data) {
  return request({
    url: "/web/v1/ShopPicVideo/insert",
    method: "post",
    data
  });
}

//删除视频/图文/日常 --------------------------------------------
export function delShopResource(params) {
  return request({
    url: "/web/v1/ShopPicVideo/delete",
    method: "delete",
    params
  });
}

//新增修改产品类型--------------------------------------------
export function inOrUpProductType(data) {
  return request({
    url: "/web/v1/prt/productType/inOrUp",
    method: "post",
    data
  });
}

//获取产品类型--------------------------------------------
export function getProductTypeList(params) {
  return request({
    url: "/web/v1/prt/productType/appData/getList",
    method: "get",
    params
  });
}

//产品类型排序--------------------------------------------
export function updateSort(params) {
  return request({
    url: "/web/v1/prt/productType/updateSort",
    method: "post",
    params
  });
}

//删除产品类型 --------------------------------------------
export function delProductType(params) {
  return request({
    url: "/web/v1/prt/productType/delete",
    method: "delete",
    params
  });
}

/**
 *产品管理-----------------------------------------------
 */
//新增产品--------------------------------------------
export function insertProduct(data) {
  return request({
    url: "/web/v1/prt/product/insert",
    method: "post",
    data
  });
}

//获取产品列表--------------------------------------------
export function getProductList(params) {
  return request({
    url: "/web/v1/prt/product/appData/getList",
    method: "get",
    params
  });
}

//修改产品--------------------------------------------
export function updateProduct(data) {
  return request({
    url: "/web/v1/prt/product/update",
    method: "post",
    data
  });
}

//删除产品 --------------------------------------------
export function delProduct(params) {
  return request({
    url: "/web/v1/prt/product/delete",
    method: "delete",
    params
  });
}
/**
 *数据分析-----------------------------------------------
 */
//获取套餐list--------------------------------------------
export function getMealList(params) {
  return request({
    url: "/web/v1/shopBuy/shopBuyMealOne/getList",
    method: "get",
    params
  });
}

//获取购买记录list--------------------------------------------
export function getHistoyList(params) {
  return request({
    url: "/web/v1/shopBuy/shopBuyMealOneLog/getList",
    method: "get",
    params
  });
}

//购买套餐 --------------------------------------------
export function buyMeal(data) {
  return request({
    url: "/web/v1/shopBuy/shopBuyMealOneLog/buyMeal",
    method: "post",
    data
  });
}
export function deleteMeal(params) {
  return request({
    url: "/web/v1/shopBuy/shopBuyMealOneLog/delete",
    method: "delete",
    params
  });
}

// 产品访问量
export function getPrtStatistics(params) {
  return request({
    url: "/web/v1/prt/product/getPrtStatistics",
    method: "get",
    params
  });
}

/**
 *系统首页-----------------------------------------------
 */
export function getHomeIndex(params) {
  return request({
    url: "/web/v1/home/home/getIndex",
    method: "get",
    params
  });
}

/**
 *店铺管理-----------------------------------------------
 */
//获取单条商家信息--------------------------------------------
export function getShopOne(params) {
  return request({
    url: "/web/v1/shop/Shop/getShopOne",
    method: "get",
    params
  });
}

//修改或增加商家信息--------------------------------------------
export function updateShopOne(data) {
  return request({
    url: "/web/v1/shop/Shop/update",
    method: "post",
    data
  });
}
//获取流量访问量统计模型
export function getFlowStatistics(params) {
  return request({
    url: "/web/v1/shop/Shop/getFlowStatistics",
    method: "get",
    params
  });
}
//获取商店访问量统计模型
export function getShopStatistics(params) {
  return request({
    url: "/web/v1/shop/Shop/getShopStatistics",
    method: "get",
    params
  });
}

/**
 *二维码-----------------------------------------------
 */
export function getCommonQRCode(params) {
  return request({
    url: "/app/v1/createCommonQRCode",
    method: "get",
    params
  });
}
